<!DOCTYPE html>
<html lang="zh-cn">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>旋转缩放动画</title>
  <style>
    * {
      margin: 0;
      padding: 0;
    }
    div {
      width: 250px;
      height: 250px;
      margin: 100px auto;
      border-radius: 50%;
      position: relative;
    }
    p {
      width: 210px;
      height: 210px;
      background-color: yellow;
      border: 20px solid rgba(255, 255, 255, .5);
      border-radius: 50%;
      background-image: url(../picture/beijing.webp);
      background-origin: border-box;
      transition: all 1.5s;
      position: absolute;
      z-index: 1;
    }
    h1 {
      width: 250px;
      height: 250px;
      background-color: black;
      border-radius: 50%;
      text-align: center;
      line-height: 250px;
      color: white;
      position: absolute;
      transition: all 1.5s;
      transform: scale(0,0) rotate(0,0);
    }
    span {
      margin: 0 20px;
    }
    div:hover p {
      transform: scale(2,2) rotate(360deg);
      opacity: 0;
    }
    div:hover h1 {
      transform: scale(1,1) rotate(360deg);
    }
  </style>
</head>
<body>
  <div>
    <p></p>
    <h1>北<span></span>京</h1>
  </div>
</body>
</html>